package stool.iteratorpattern;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author Felix YF Dong
 * @Date 2021/5/11
 */
public class ConcreteAggregate extends Aggregate{

    private List<Object> items = new ArrayList<>();

    @Override
    public Iterator createIterator() {
        return null;
    }

    public int size() {
        return items.size();
    }

    public Object get(int index) {
       return items.get(index);
    }

    public void add(Object o) {
        items.add(o);
    }
}
